package com.pbking.facebook.delegates.feed
{
	import com.pbking.facebook.Facebook;
	import com.pbking.facebook.data.feed.TemplateBundle;
	import com.pbking.facebook.delegates.FacebookDelegate;

	/**
	 * example json return value from facebook: 
	 * {"one_line_story_templates":["{*actor*} did this"],"short_story_templates":[{"template_title":"{*actor*} did this in short stories","template_body":""}],"full_story_template":{"template_title":"{*actor*} did this in full story","template_body":"{*actor*} did this in full story again"},"time_created":1219714307,"template_bundle_id":31863366677}
	 * 
	 * one_line_story_templates is required parameters, short_story_templates, and full_story_template are optional parameters.
	 * 
	 * @author sol wu
	 * @see http://wiki.developers.facebook.com/index.php/Feed.getRegisteredTemplateBundleByID
	 */
	public class GetRegisteredTemplateBundleByIDDelegate extends FacebookDelegate
	{
		public var bundle:TemplateBundle = null;
		
		public function GetRegisteredTemplateBundleByIDDelegate(facebook:Facebook, template_bundle_id:String)
		{
			super(facebook);
			fbCall.setRequestArgument("template_bundle_id", template_bundle_id);
			fbCall.post("facebook.feed.getRegisteredTemplateBundleByID");
		}

		override protected function handleResult(result:Object):void
		{
			if (result != null) bundle = new TemplateBundle(result);
		}
		
	}
}